package com.kaizeli.website.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.kaizeli.website.pojo.entity.TravelExpense;
import com.kaizeli.website.pojo.dto.TravelExpenseDTO;
import com.kaizeli.website.response.Result;

import java.math.BigDecimal;
import java.util.List;

/**
 * 差旅费用服务接口
 */
public interface TravelExpenseService extends IService<TravelExpense> {

    /**
     * 根据验收节点ID查询差旅费用列表
     */
    Result<List<TravelExpenseDTO>> getTravelExpensesByAcceptanceId(Long acceptanceId);

    /**
     * 根据员工ID查询差旅费用列表
     */
    Result<List<TravelExpenseDTO>> getTravelExpensesByEmployeeId(Long employeeId);

    /**
     * 根据项目ID查询差旅费用列表
     */
    Result<List<TravelExpenseDTO>> getTravelExpensesByProjectId(Long projectId);

    /**
     * 创建差旅费用记录
     */
    Result<TravelExpense> createTravelExpense(TravelExpense travelExpense);

    /**
     * 更新差旅费用记录
     */
    Result<TravelExpense> updateTravelExpense(TravelExpense travelExpense);

    /**
     * 审核差旅费用
     */
    Result<Void> reviewTravelExpense(Long id, String status);

    /**
     * 计算验收节点总差旅费用
     */
    Result<BigDecimal> calculateTotalTravelExpense(Long acceptanceId);

    /**
     * 批量创建差旅费用记录
     */
    Result<Void> batchCreateTravelExpenses(List<TravelExpense> travelExpenses);
}
